// 声明用的工具
const {app, BrowserWindow} = require('electron')


function createWindow () {
 
  const mainWindow = new BrowserWindow({
    width: 800,
    height: 600,
    webPreferences: {
      
    }
  })

 //打开pi网站
  mainWindow.loadURL('https://cdn-app.minepi.com/auth#access_token=null&behaviors=%7B%22platform%22%3A%7B%22os%22%3A%22android%22%2C%22version%22%3A30%2C%22deviceUuid%22%3A%223506413b-f36b-46c5-85e5-b59e714a8f99%22%7D%2C%22bundleData%22%3A%7B%22versionNumber%22%3A%221.34.2%22%2C%22buildNumber%22%3A%2265%22%2C%22bundleIdentifier%22%3A%22com.blockchainvault%22%2C%22buildVariant%22%3A%22world%22%7D%2C%22pushSubscriptionState%22%3A%7B%22isEmailSubscribed%22%3Afalse%2C%22isSMSSubscribed%22%3Afalse%2C%22isSubscribed%22%3Afalse%2C%22isPushDisabled%22%3Afalse%2C%22hasNotificationPermission%22%3Afalse%2C%22emailSubscribed%22%3Afalse%2C%22subscriptionEnabled%22%3Afalse%2C%22notificationsEnabled%22%3Afalse%2C%22userSubscriptionEnabled%22%3Afalse%7D%2C%22trackingStatus%22%3A%22unavailable%22%2C%22systemShareDialogSupported%22%3Atrue%2C%22customConversationNotifications%22%3Atrue%2C%22nativeSupport%22%3A%7B%22canGetOnesignalPlayerId%22%3Atrue%2C%22facebookVerificationSupported%22%3Atrue%2C%22adsSupported%22%3Atrue%2C%22bannerAdsWaterfall%22%3Atrue%2C%22inlineMediaPlayback%22%3Atrue%7D%7D')
  

}


app.whenReady().then(() => {
  createWindow()

  app.on('activate', function () {
   
    if (BrowserWindow.getAllWindows().length === 0) createWindow()
  })
})


app.on('window-all-closed', function () {
  if (process.platform !== 'darwin') app.quit()
})
